package org.sy.lab.Java7并发编程实战.三线程同步辅助类.四在集合点的同步;

public class Grouper implements Runnable {
	private Results results;
	public Grouper(Results results) {
		this.results = results;
	}
	@Override
	public void run() {
		int finalResult = 0;
		System.out.printf("Grouper: Processing results...\n");
		int data[] = results.getData();
		for(int number : data) {
			finalResult += number;
		}
		System.out.printf("Grouper: Total result: %d.\n", finalResult);
	}
}
